On Nitro-based instances, access serial logs directly #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Accessing console logs by the default method is slow, as it can take up to 15 minutes for the output to appear.
Nitro-based instances have a feature that allows querying the serial log directly, which updates much more quickly. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/troubleshoot-unreachable-instance.html#instance-console-console-output
This has been tested by causing all instances in dev to be replaced, and re-querying their host keys. All hosts responded within two queries.
It is not clear what the fallback behaviour of this switch is when applied to a non-Nitro instance, as we have no such instances to test with. Ideally it would revert to the old behaviour, if not we may need to add a command-line flag to support older instances, or clarify that this feature only works on Nitro hosts.
If possible, please merge preserving the commit ID, or update the PR here to reflect the correct HEAD commit: https://github.com/bitnomial/bitnomial/pull/6253